<template>
    <div id="container">
      <el-container style="height: 500px; border: 1px solid #eee">
        <el-aside width="150px" style="background-color: rgb(238, 241, 246)">
          <el-menu :default-openeds="['1', '3']" router>
            <el-menu-item index="/Console/User"><i class="el-icon-s-custom"></i>用户</el-menu-item>

            <el-menu-item index="/console/note"><i class="el-icon-notebook-2"></i>笔记</el-menu-item>

            <el-menu-item index="/console/blog"><i class="el-icon-edit"></i>博客</el-menu-item>
          </el-menu>
        </el-aside>
        
        <el-container>
          <el-header style="text-align: right; font-size: 14px">
            
            <span style="margin-right:20px">你好！{{$store.getters.getUser.username}}</span>
            <el-button type="warning" round size="mini" @click="logout">注销</el-button>
          </el-header>
          <el-main>
            <router-view></router-view>
          </el-main>
        </el-container>
      </el-container>
    </div>
</template>

<script>
  import {logout} from "network/app"
  export default {
    data() {
      
      return {
        
      }
    },
    methods: {
      logout(){
        logout()
          .then(res => {
            console.log(res)
          })
      }
    }
  };
</script>

<style scoped>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }
  .el-container{
    height: 100% !important;
  }
  #container{
    height: 100%;
  }
  .el-aside {
    color: #333;
  }
</style>
